-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
compiler: Make Externally Implementable Items (eii) in std build #150592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
This comment was marked as outdated.
This comment was marked as outdated.
|
Ok let's roll then: r? compiler |
|
@rustbot ready |
|
I'll do it anyway, reached cap because of the holidays |
|
So I think what's going on here is that in std, all items must have a stability attribute. And since we generate a bunch of extra items, their stability attributes match. I remember leaving a FIXME somewhere even that we have to forward more attributes. However, I'd like to be somewhat systematic about that. Making sure we forward all the right attributes to the right items, not just stability. I'm not sure I understand the transparency attributes entirely correctly, but I think stability is tracked through spans and as such, the spans generated by the macro expansion affect the stability of the items. I think the real solution is to forward stability attributes themselves? |
|
I could be wrong there, maybe you've tried that |
|
(oh, sent you a message on zulip btw) |
|
@rustbot author |
Closes #150514
Merging this PR unblocks #150591 and that PR will also act as a regression test since the code in that PR does not build without this fix. We could add a temporary dummy eii item to std before that PR lands, but it does not seem worth the effort.
To be honest I don't fully understand why
#[rustc_macro_transparency = "transparent"]works, all I know is that it works. Without it, we get > 800 errors that looks like this.r? @jdonszelmann is maybe interested in reviewing? Of course feel free to re-roll if you don't have time right now though.
Tracking issues
#[std::io::on_broken_pipe]#150588